﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BonjourHotel.Model;

namespace BonjourHotel.Core.Localization
{
    public class LocaleStringResourceFacade : FacadeBase<LocaleStringResource>
    {
        public string GetStringResource(string key, string language)
        {
            string value = (from str in this.ObjectContext.LocaleStringResourceSet.Include("Language")
                            where str.StringKey == key && str.Language.Name == language
                            select str.StringValue).FirstOrDefault();

            return value;

        }
    }
}
